/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/idenger">idenger</a> All rights reserved.
 */
package com.idenger.modules.project.entity.message;

import org.hibernate.validator.constraints.Length;

import com.idenger.common.persistence.DataEntity;

/**
 * 消息Entity
 * @author chenlin
 * @version 2018-04-11
 */
public class Message extends DataEntity<Message> {
	
	private static final long serialVersionUID = 1L;
	private String receiverId;		// 消息接受者ID
	private String isRead;		// 是否已读
	private String messageContent;		// 消息内容
	private String messageTitle;		// 消息标题
	private String sourceRemarks;		// 数据源备注
	private String deleteFlag;		// 删除标记
	
	public Message() {
		super();
	}

	public Message(String id){
		super(id);
	}

	@Length(min=0, max=64, message="消息接受者ID长度必须介于 0 和 64 之间")
	public String getReceiverId() {
		return receiverId;
	}

	public void setReceiverId(String receiverId) {
		this.receiverId = receiverId;
	}
	
	@Length(min=0, max=2, message="是否已读长度必须介于 0 和 2 之间")
	public String getIsRead() {
		return isRead;
	}

	public void setIsRead(String isRead) {
		this.isRead = isRead;
	}
	
	public String getMessageContent() {
		return messageContent;
	}

	public void setMessageContent(String messageContent) {
		this.messageContent = messageContent;
	}
	
	@Length(min=0, max=512, message="消息标题长度必须介于 0 和 512 之间")
	public String getMessageTitle() {
		return messageTitle;
	}

	public void setMessageTitle(String messageTitle) {
		this.messageTitle = messageTitle;
	}
	
	@Length(min=0, max=255, message="数据源备注长度必须介于 0 和 255 之间")
	public String getSourceRemarks() {
		return sourceRemarks;
	}

	public void setSourceRemarks(String sourceRemarks) {
		this.sourceRemarks = sourceRemarks;
	}
	
	@Length(min=0, max=1, message="删除标记长度必须介于 0 和 1 之间")
	public String getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(String deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	
}